#include "gemv.hpp"

std::vector<int64_t> GEMVTester::Baseline(const Matrix<int64_t> &matrix,
    const std::vector<int64_t> &vector) {
  size_t row = matrix.Row();
  size_t col = matrix.Col();
  std::vector<int64_t> result(row);
  for (size_t i = 0; i < row; ++i) {
    int64_t sum = 0;
    for (size_t j = 0; j < col; ++j) {
      sum += matrix[i][j] * vector[j];
    }
    result[i] = sum;
  }
  return result;
}

std::vector<int64_t> GEMVTester::Implementation(const Matrix<int64_t> &matrix,
    const std::vector<int64_t> &vector) {
  size_t row = matrix.Row();
  size_t col = matrix.Col();
  std::vector<int64_t> result(row);
  // TODO: optimize the GEMV implementation
  return result;
}
